package string;

public class Test1 {
    public static void main(String[] args) {


    }

    public abstract class Animal{
        public abstract void speak();

    }
    public class Dog extends Animal{
        public void speak(){
            System.out.println("wang!");
        }

    }
    public class Cat extends Animal{
        public void speak(){
            System.out.println("miao~");
        }
    }

}
